package com.bc.bclocalserviceapihttp.controller;

import com.bc.bcapi.service.*;
import com.bc.bcapi.service.cj.GenerationBinanService;
import com.bc.commonentity.common.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Name ProjectController
 * @Description
 * @Author douhaichao
 * @Date 2018/8/25 16:59
 * @Version 1.0
 **/
@Api(value = "项目相关")
@RestController
@RequestMapping(value = "project")
public class ProjectController {

    @Autowired
    T_Sendcoin_logService t_sendcoin_logService;
    @Autowired
    T_Project_searchService t_project_searchService;

    @Autowired
    ProjectGenerationIcoWatchListService projectGenerationIcoWatchListService;

    @Autowired
    ProjectGenerationMyTokenService projectGenerationMyTokenService;

    @Autowired
    GenerationBinanService generationBinanService;

    @ApiOperation(value = "创建搜索列表条件返回值属性方法")
    @RequestMapping(value = "createsearch", method = RequestMethod.GET)
    public JsonResult createSearch() {
        return t_project_searchService.createSearch();
    }

    @ApiOperation(value = "采集ICO")
    @RequestMapping(value = "generationico", method = RequestMethod.GET)
    public JsonResult generationIco() {
        return projectGenerationIcoWatchListService.generationIco();
    }

    @ApiOperation(value = "自动发币")
    @RequestMapping(value = "sendcoin", method = RequestMethod.GET)
    public JsonResult sendCoin() {
        return t_sendcoin_logService.sendCoin();
    }

    @ApiOperation("获取mytoken.io市值榜")
    @RequestMapping(value = "generationmytokenio", method = RequestMethod.GET)
    public JsonResult generationMyTokenIO() {
        return projectGenerationMyTokenService.generationMyTokenIO();
    }

    @ApiOperation("获取币安数据")
    @RequestMapping(value = "generationbinance", method = RequestMethod.GET)
    public JsonResult generationBinance() {
        return generationBinanService.generationIco();
    }
}
